﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace POVRay {
    [PRBlock("box")]
    public class Box : Object {
        [PRParam(HasComma=true)]
        public Vector3 Corner1 { get; set; }

        [PRParam()]
        public Vector3 Corner2 { get; set; }

        public Box(Vector3 corner1, Vector3 corner2) {
            Corner1 = corner1;
            Corner2 = corner2;
        }

        public Box(Vector3 dimension) {
            Corner1 = dimension * 0.5f;
            Corner2 = dimension * -0.5f;
        }

        public Box(float dimension) {
            Corner1 = new Vector3(dimension * 0.5f, dimension * 0.5f, dimension * 0.5f);
            Corner2 = new Vector3(dimension * -0.5f, dimension * -0.5f, dimension * -0.5f);
        }

        public override string ToString(int level) {
            return this.POVRayString(level);

            //return "plane { " + Scene.Indentation(level + 1) + Normal + " " + Scene.Indentation(level+1) + Offset.POVRayString() + " " + GeneralParameters(level + 1) + " " + Scene.Indentation(level) + "}";
        }
    }
}
